<template>
  <div class="page">
    <el-upload
      class="upload-demo upload"
      drag
      action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"
      multiple
    >
      <el-icon class="el-icon--upload" style="color: #71acff"><upload-filled /></el-icon>
      <div class="title">上传文档开始问答</div>
      <div class="el-upload__text">支持 doc 文档格式.</div>
    </el-upload>
    <div class="footer">
      <div class="left">
        <img src="../assets/history.svg" />
        <div class="word">
          <div class="title">向历史文档提问</div>
          <div class="el-upload__text">选择一个或多个历史文档</div>
        </div>
      </div>
      <div class="right">
        <img src="../assets/knowledge.svg" />
        <div class="word">
          <div class="title">向知识库提问</div>
          <div class="el-upload__text">知识库问答当前内测中</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { UploadFilled } from '@element-plus/icons-vue'
</script>

<style lang="scss" scoped>
.page {
  width: 100%;
  height: 100%;
  background-color: #f0f2f5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  color: #333;
  .upload {
    width: 840px;
    height: 300px;
    background: #fff;
    border-radius: 10px;
    :deep(.el-upload) {
      height: 100%;
      .el-upload-dragger {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        border-radius: 10px;
        .title {
          font-size: 24px;
          margin-bottom: 20px;
        }
      }
    }
  }
  .footer {
    width: 100%;
    height: 150px;
    display: flex;
    gap: 20px;
    width: 840px;
    margin-top: 40px;
    .left,
    .right {
      flex: 1;
      background: #fff;
      border-radius: 10px;
      display: grid;
      grid-template-columns: max-content 1fr;
      gap: 20px;
      padding: 30px 60px;
      justify-content: center;
      cursor: pointer;
      .word {
        display: grid;
        grid-template-rows: 1fr 1fr;
        gap: 10px;
      }
      .title {
        font-size: 24px;
      }
      .el-upload__text {
        font-size: 14px;
        color: #606266;
      }
    }
    .left img {
      width: 62px;
      height: 75px;
    }
    .right img {
      width: 80px;
      height: 75px;
    }
  }
}
</style>
